﻿using Castle.MicroKernel.Registration;
using TianYuan.Core.Dependency;
using TianYuan.Core.Domain.Repositories;
using TianYuan.Data.Dapper.Repositories;
using TianYuan.Data.Dapper.Uow;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TianYuan.Data.Dapper.Dependency
{
    class DapperDataConventionalRegistrar : IConventionalDependencyRegistrar
    {
        public void RegisterAssembly(IConventionalRegistrationContext context)
        {
            context.IocManager.IocContainer.Register(
                //Component.For<DbContextBase>().ImplementedBy<DapperContext>().LifestylePerWebRequest()
                //Component.For<IDapperUnitOfWork>().ImplementedBy<UnitOfWork>().LifestyleTransient(),
               // Component.For(typeof(IRepository<>)).ImplementedBy(typeof(Repository<>)).LifestyleTransient()
                );
            //context.IocManager.IocContainer.Register(


            //    //Classes.FromAssembly(context.Assembly)
            //    //    .BasedOn<ApiController>()
            //    //    .LifestyleTransient()
            //    );
        }
    }
}
